def check_dependencies():
    import platform

    missing = []
    for module in ["faster_whisper", "transformers", "pyaudio"]:
        try:
            __import__(module)
        except ImportError:
            missing.append(module)

    if platform.system() == "Windows":
        try:
            __import__("soundcard")
        except ImportError:
            missing.append("soundcard (系统音频捕获)")

    if missing:
        print("❌ 缺少以下依赖:")
        for dep in missing:
            print(f"   - {dep}")
        raise SystemExit("请先运行 pip install -r requirements.txt")
